{ Siberian Olympiad. 1 stage.
  Problemset: http://agul-problems1.googlecode.com/svn/trunk/2010-2011/wso/stage1/wso_1stage.pdf
  Problem 3
  Points: 100
}
const del=1000000009;
var i,n,m,dif:integer; s:string; a:array[1..26] of integer; fact:array[1..101] of int64; result,cur:int64;
begin
assign(input,'input.txt');
assign(output,'output.txt');
reset(input);
rewrite(output);
readln(n,m);
readln(s);
for I := 1 to 26 do A[I]:=0;
dif:=0;
for I := 1 to m do inc(a[ord(s[i])-96]);
for I := 1 to 26 do if a[i]<>0 then inc(dif);
result:=dif;
for I := 2 to n do result:=(result*dif) mod del;
writeln(result);
close(input);
close(output);
end.
